<template>
  <div class="total-area">
    <div class="totla-top">
      <div>设备总数</div>
      <div>{{ totalObj.totalNum }}</div>
    </div>
    <div class="total-item">
      <img src="@/assets/images/inspect/total1.png" alt="" />
      <div class="total-mid total-mid1">
        <div>高频告警</div>
        <div>{{ totalObj.highFrequencyAlarmNum }}</div>
      </div>
    </div>
    <div class="total-item">
      <img src="@/assets/images/inspect/total3.png" alt="" />
      <div class="total-mid total-mid2">
        <div>正常</div>
        <div>{{ totalObj.noAlarmNum }}</div>
      </div>
    </div>
    <div class="total-item">
      <img src="@/assets/images/inspect/total2.png" alt="" />
      <div class="total-mid total-mid3">
        <div>低频告警</div>
        <div>{{ totalObj.lowFrequencyAlarmNum }}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    totalObj: {
      type: Object,
      default: {},
    },
  },
  data() {
    return {};
  },
  created() {},
  methods: {},
};
</script>

<style lang="scss" scoped>
.total-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  .totla-top {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 10px;
    div {
      &:nth-child(2) {
        margin-left: 5px;
      }
    }
  }
  .total-item {
    position: relative;
    width: 76px;
    height: 76px;
    margin-bottom: 10px;
    img {
      width: 76px;
      height: 76px;
    }
    .total-mid {
      position: absolute;
      z-index: 2;
      display: flex;
      flex-direction: column;
      align-items: center;
      div {
        &:nth-child(1) {
          font-size: 12px;
        }
        &:nth-child(2) {
          font-size: 10px;
        }
      }
    }
    .total-mid1 {
      top: 26px;
      left: 14px;
      div {
        &:nth-child(2) {
          color: #d7451c;
        }
      }
    }
    .total-mid2 {
      top: 26px;
      left: 24px;
      div {
        &:nth-child(2) {
          color: #0fab49;
        }
      }
    }
    .total-mid3 {
      top: 26px;
      left: 14px;
      div {
        &:nth-child(2) {
          color: #e18903;
        }
      }
    }
  }
}
</style>
